package com.qnkf.controller.user;

import com.alibaba.fastjson.JSONObject;
import com.qnkf.aop.ApiController;
import com.qnkf.controller.BaseController;
import com.qnkf.model.ResultModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Dercsription
 * @Author Administrator
 * @CreateDate 2021/8/28 14:38
 **/
@RestController
@RequestMapping("userApi/home")
public class LoginController extends BaseController {

    /**
     * wechat-login
     * @param request
     * @return
     */
    @PostMapping("/loginWechat")
    @ApiOperation(value = "用户端查询表单启用的表单")
    @ApiController(paramClass = JSONObject.class)
    public ResultModel loginWechat(@RequestAttribute JSONObject request){
        return userFegin.test(request);
    }

    /**
     * wechat-login
     * @param request
     * @return
     */
    @PostMapping("/loginPhone")
    @ApiOperation(value = "用户端查询表单启用的表单")
    @ApiController(paramClass = JSONObject.class)
    public ResultModel loginPhone(@RequestAttribute JSONObject request){
        return loginFegin.loginPhone(request);
    }


}
